import * as React from 'react';
import type { onSelectType } from './types';
import './index.module.scss';
const { memo } = React;

interface SuggestItemProps {
  name: string;
  onClick: onSelectType;
}
function SuggestItem(props: SuggestItemProps) {
  const { name, onClick } = props;

  return (
    <li styleName="city-suggest-li" onClick={() => onClick(name)}>
      {name}
    </li>
  );
}
export default memo(SuggestItem);
